#include<cstdio>
#include<cmath>

const double PI=acos(-1.0);
const double EPS=1e-7;
const int MAXN=10010;
int n,f;
double maxans;
double s[MAXN];
double max(double a,double b)
{
    return a>b?a:b;
}
bool check(double size)
{
    int tem=0;
    for(int i=1;i<=n;i++)
    {
        tem+=(int)(s[i]/size);
    }
    if(tem<f)return false;
    else return true;
}

double binaryAns(double L,double R)
{
    double left=L;
    double right=R;
    double ans=R;
    while(right-left>EPS)
    {
        double mid=(left+right)/2;//注意防止L+R溢出
        if(check(mid))
        {
            ans=mid;
            left=mid;
        }
        else right=mid;
    }
    return ans;
}
int main()
{
    int t;
    scanf("%d",&t);
    while(t--)
    {
        scanf("%d%d",&n,&f);
        f++;
        maxans=0;
        for(int i=1;i<=n;i++)
        {
            int tem;
            scanf("%d",&tem);
            s[i]=PI*tem*tem;
            maxans=max(maxans,s[i]);
        }
        double ans=binaryAns(0,maxans);
        printf("%0.4lf\n",ans);
    }
    return 0;
}
